export const elInput = 'el-input'

export const elSelect = 'el-select'

export const elRadioGroup = 'el-radio-group'

export const elSwitch = 'el-switch'

export const elCheckboxGroup = 'el-checkbox-group'

export const elInputNumber = 'el-input-number'

export const elTimeSelect = 'el-time-select'

export const elDatePicker = 'el-date-picker'

export const elCascader = 'el-cascader'

export const elUpload = 'el-upload'

export const span = 'span'

export const elButton = 'el-button'

// 依据 el-form 对表单项做统一预设置
export const getElemMapping = () => ({
  [elInput]: {
    initialVal: '',
    defaultProps: {
      clearable: true
    }
  },
  [elSelect]: {
    initialVal: '',
    defaultProps: {}
  },
  [elRadioGroup]: {
    initialVal: '',
    defaultProps: {}
  },
  [elSwitch]: {
    initialVal: false,
    defaultProps: {}
  },

  [elCheckboxGroup]: {
    initialVal: [],
    defaultProps: {}
  },
  [elInputNumber]: {
    initialVal: 1,
    defaultProps: {}
  },
  [elTimeSelect]: {
    initialVal: '',
    defaultProps: {}
  },
  [elDatePicker]: {
    initialVal: '',
    defaultProps: {}
  },
  [elCascader]: {
    initialVal: '',
    defaultProps: {
      clearable: true
    }
  },
  [elUpload]: {
    initialVal: [],
    defaultProps: {}
  },
  [span]: {
    initialVal: '',
    defaultProps: {}
  },
  [elButton]: {
    initialVal: '',
    defaultProps: {}
  }
}
)
